*{
    margin: 0;
    padding: 0;
}

a{
    text-decoration: none;
}

body{
    min-width: 300px;
}

img{
    max-width: 100%;
    vertical-align: top;
}

.sd_l{
    box-shadow: 5px 0 5px -5px rgba(0, 0, 0, 0.3) inset;
}

.brown{
    color: #C2A661;
}
/* 导航栏部分 */
header{
    padding: 25px;
    box-sizing: border-box;
}

header>nav{
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo{
    width: 40px;
    height: 40px;
    background: url(../images/logo.svg) no-repeat;
    background-size: 100% 100%;
}

header>nav>div{
    display: flex;
    align-items: center;
}

header>nav a{
    font-size: 1rem;
    font-weight: 600;
    color: black;
    margin-left: 20px;
}

header>article{
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

header>article>div{
    display: flex;
    align-items: center;
    margin-top: 15px;
}

header>article>div a{
    color: #00A862;
    font-size: 18px;
    margin: 10px;
}

header>article>div a:nth-child(3){
    margin-left: 10px;
    padding: 5px 10px;
    border: 1px solid #00A862;
    border-radius: 20px;
}

/* content部分 */
#content{
    position: relative;
}

.container{
    width: 80%;
}

#content>.ad img:nth-child(2){
    display: none;
}

#content>.sd_l:nth-child(even){
    background-color: rgba(0, 0, 0, 0.05);
}

#content>.ad p{
    font-size: 12px;
    color: #79A0A2;
    background-color: #082F32;
    padding: 3px 5px;
    border-radius: 5px;
    position: absolute;
    top: 10px; right: 10px;
}

#content>.pic{
    padding: 25px;
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(3,1fr);
}

.shadow{
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.08);
}

.shadow:hover{
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.2);
}

#content>.sd_l:nth-child(3){
    padding: 25px;
}

#content>.sd_l:nth-of-type(3)>div{
    width: 80%;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-items: center;
}

#content>.sd_l:nth-of-type(3)>div>div>p:nth-of-type(1){
    font-size: 23px;
    font-weight: 600;
    padding: 15px 0px;
}

#content>.sd_l:nth-of-type(3)>div>div>p:nth-of-type(2){
    color: #999;
    line-height: 2em;
    margin-bottom: 30px;
}

#content>.sd_l:nth-of-type(3)>div>div>div a{
    color: #00A862;
    padding: 8px 15px;
    border: 1px solid #00A862;
    border-radius: 25px;
    margin-right: 5px;
    display: inline-block;
}

#content>.sd_l:nth-of-type(4)>.container,.container>p{
    text-align: center;
}

#content .title{
    padding: 40px 0px 10px;
    font-size: 24px;
    font-weight: 500;
}

#content .gray{
    color: #999;
    padding: 10px 0px 40px;
}

.sd_l:nth-of-type(4)>.container>div{
    padding: 35px 0px;
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
}

.sd_l:nth-of-type(4)>.container>div>.shadow{
    background-color: #fff;
    position: relative;
}

.sd_l:nth-of-type(4)>.container>div>.shadow>img{
    width: 100px;
    height: 80px;
    transform: translateY(-40px);
}

.sd_l:nth-of-type(4)>.container>div>.shadow>p{
    font-size: 15px;
    color: #999;
    margin: 5px;
}

.sd_l:nth-of-type(4)>.container>div>.shadow>p:nth-of-type(1){
    font-size: 17px;
    font-weight: bold;
    color: black;
    margin: 10px;
    margin-top: -30px;
}

.sd_l:nth-of-type(4)>.container>div>.shadow>a{
    font-size: 13px;
    margin: 25px auto;
    display: block;
}

.sd_l:nth-of-type(5){
    text-align: center;
    position: relative;  
    overflow: hidden;
}

.sd_l:nth-of-type(5)>div>div:first-of-type{
    display: grid;
    grid-template-columns: repeat(4,250px);
    gap: 20px;
    position: relative;
    text-align: left;
}

.sd_l:nth-of-type(5)>div>div:first-of-type>div>img{
    width: 100%;
    height: 150px;
}

.sd_l:nth-of-type(5)>div>div:first-of-type>div>p{
    padding: 10px;
}

.sd_l:nth-of-type(5)>div>div:last-of-type{
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0px 10px;
    font-size: 15px;
    color: #666;
}

.sd_l:nth-of-type(5)>div>div:last-of-type>img{
    width: 15px;
    height: 15px;
    margin-right: 10px;
}

.sd_l:nth-of-type(5) .container>.shadow::before{
    content: '咖啡知识';
    width: 80px;
    line-height: 30px;
    text-align: center;
    display: block;
    color: white;
    background-color: #C2A661;
    font-size: 15px;
    position: absolute;
    top: 5px;
}

.sd_l:nth-of-type(5) .container>.shadow:nth-child(even):before{
    content: '咖啡品鉴';
}

.btn{
    background-color: #fff;
    border-radius: 50%;
    padding: .3em;
    box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.05);
    position: absolute;
    top: calc(50% + 1.5em);
    cursor: pointer;
    transition: .6s;
}

.btn:hover{
    transform: translateY(-5px);
}

.btn:nth-of-type(2){
    display: none;
}

#cafe{
    transition: 1s;
}

.btn:nth-of-type(2){
    left: 30px;
}

.btn:nth-of-type(3){
    right: 30px;
}

/* 尾部菜单 */
footer{
    display: none;
}

footer>div{
    width: 100%;
    padding: 5px;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    text-align: center;
    font-size: 14px;
    color: #999;
    box-shadow: 0 0 3px 2px rgba(0, 0, 0, 0.08);
    position: fixed;
    bottom: 0;
}

footer .ft:first-of-type>p{
    color: #00A862;
}

@media(min-width:1025px){
    header{
        width: 30%;
        height: 100%;
        position: fixed;
    }

    header>article{
        padding-left: 60px;
    }

    #content{
        width: 70%;
        margin-left: 30%;
    }
}

@media(max-width:1025px) and (min-width:640px){
    header{
        padding: 15px;
    }

    header>article>h1{
        margin-top: 20px;
    }
    header>article>div{
        margin: 5px;
    }
}

@media(min-width:640px){
    .shadow:hover{
        transform: translateY(-3px);
        transition: .3s;
    }

    .container{
        max-width: 700px;
        margin: auto;
    }
}

@media(max-width:640px){
    header>nav,header>article div,.ad>img:nth-child(1){
        display: none;
    }

    header{
        padding: 15px;
    }

    #content .ad>img:nth-child(2){
        display: block;
    }

    #content>.pic,#content>.sd_l:nth-of-type(3)>div{
        grid-template-columns: 1fr;
    }

    .sd_l:nth-of-type(3)>div{
        text-align: center;
    }

    .sd_l:nth-of-type(3)>div>img{
        margin-top: 40px;
    }

    .container{
        width: 100%;
        padding: 0px 20px;
        box-sizing: border-box;
    }

    .sd_l:nth-of-type(4)>.container>div{
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .sd_l:nth-of-type(4)>.container>div>.shadow:nth-of-type(n+3){
        margin-top: 30px;
    }

    .sd_l:nth-of-type(5){
        margin-bottom: 70px;
    }
    
    footer{
        display: block;
    }
}